package com.cuijq.ms.flyweight.v4;

import java.awt.Font;

/**
 * @author by CuiJQ
 * @Classname CharacterStyle
 * @Description CharacterStyle Description
 * @Date 2021/5/27 0:03
 */
public class CharacterStyle {

  private Font font;
  private int size;
  private int colorRGB;

  public CharacterStyle(Font font, int size, int colorRGB) {
    this.font = font;
    this.size = size;
    this.colorRGB = colorRGB;
  }

  @Override
  public boolean equals(Object o) {
    CharacterStyle otherStyle = (CharacterStyle) o;
    return font.equals(otherStyle.font) && size == otherStyle.size && colorRGB == otherStyle.colorRGB;
  }
}
